home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / wemdemo4.zip / INFO / EVI (.txt) < prev    next >
GNU Info File  |  1994-09-21  |  35KB  |  661 lines

  1. This is Info file ../info/evi, produced by Makeinfo-1.56 from the input
  2. file evi.txi.
  3.    This file documents Evi - a vi emulator for GNU Emacs
  4.    Copyright (C) 1992, 1993  Jeffrey R. Lewis
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided that
  10. the entire resulting derived work is distributed under the terms of a
  11. permission notice identical to this one.
  12.    Permission is granted to copy and distribute translations of this
  13. manual into another language, under the same conditions as for modified
  14. versions.
  15. File: evi,  Node: Top,  Next: Overview,  Prev: (DIR),  Up: (DIR)
  16. * Menu:
  17. * Overview::            What is Evi?
  18. * Setting up Evi::        How to start using Evi
  19. * File and buffer management::    How vi file and buffer commands
  20.                 work under Evi, plus Evi extensions
  21. * Window management::        How vi window management commands
  22.                 work under Evi, plus Evi extensions
  23. * Emacs commands::        How to access emacs commands from Evi
  24. * Emacs editing modes::        Taking advantage of emacs editing modes
  25. * Customizing::            How to customize Evi
  26. * Arrow keys::            How to use the arrow keys
  27. * Enhancements::        Various Evi enhancements to vi
  28. * New operators::        New commands that operate over regions
  29. * Differences::            Differences between Evi and vi
  30. * Ex commands::            Supported ex commands and variable settings
  31. * Note to vip users::        Differences between Evi and vip
  32. * Bugs::            What to do if things go wrong
  33. * Mailing list::        How to join and submit to the Evi mailing list
  34. * Getting a copy of Evi::    How and where to get more recent copies of Evi
  35. * Credits::            Who contributed to Evi
  36. File: evi,  Node: Overview,  Next: Setting up Evi,  Prev: Top,  Up: Top
  37.    Evi is a vi emulator aimed at those who are either just plain
  38. accustomed to vi, or who just simply happen to like its style of
  39. editing better than emacs' default.  Evi's first goal is vi
  40. compatibility.  Its second goal is to be an extension of vi, taking
  41. advantage of features supplied by the emacs environment, without simply
  42. becoming emacs with vi'ish key bindings.
  43.    Ideally, you shouldn't need any special manual to start using Evi,
  44. other than your vi manual.  By default evi is set-up to emulate vi as
  45. closely as possible, including using your EXINIT environment variable
  46. and/or .exrc startup files.  Of course, you'll need to know how to get
  47. started with Evi, and you'll probably want to take advantage of some of
  48. Evi's extensions, and be aware of what's different between vi and Evi.
  49. That's what this manual covers.
  50.    A note on conventions used in this manual: `M-x' means the escape
  51. key followed by the character x (where x is any character), `C-x' means
  52. control-x, RET means the return key, ESC means the escape key.
  53. File: evi,  Node: Setting up Evi,  Next: File and buffer management,  Prev: Overview,  Up: Top
  54. Setting up Evi
  55. ==============
  56.    To just test Evi out, type:
  57.      M-x load-file RET evi.el RET
  58.      M-x evi RET
  59.    (don't type the spaces) You will now be in the emulator.
  60.    If you have any trouble at this point due to something in your
  61. `.exrc' or `EXINIT', and wish to suppress sourcing of `.exrc' and
  62. `EXINIT', place the following in your `.emacs':
  63.      (setq evi-supress-ex-startup t)
  64.    Then, send me a note with the contents of your `.exrc' and `EXINIT'
  65. so we can fix the problem.
  66.    If you decide to continue using Evi, I would recommend first you byte
  67. compile it to speed things up, using the following shell command:
  68.      emacs -batch -l evi.el -f batch-byte-compile evi.el
  69.    Next, if you want to use Evi all the time, put the following at the
  70. end of your `.emacs' file:
  71.      (load "<wherever-evi-is>/evi")
  72.      (setq term-setup-hook 'evi)
  73.    this will make emacs go into Evi every time you fire it up.  Of
  74. course, you may wish to have Evi properly installed for all to use -
  75. consult your local emacs guru.
  76. File: evi,  Node: File and buffer management,  Next: Window management,  Prev: Setting up Evi,  Up: Top
  77. File and buffer management
  78. ==========================
  79.    Vi's file management commands have long tried to mimic having
  80. multiple buffers, and as such, work well enough to use in an emacs
  81. setting.  They of course have to take on slightly different meanings,
  82. since it makes little sense to emulate the limitations of the vi/ex
  83. model that presumably you are trying to avoid by using Evi!
  84.      Edit a file in the current window.  With no argument, brings in a
  85.      new copy of the file (useful if it has been subsequently modified
  86.      on disk).  `:e!' will override any complaints about the current
  87.      buffer being modified, and discards all modifications.  With a
  88.      filename argument, edits that file in the current window (using
  89.      the copy already in the editor if it was previously read in).
  90.      There is no difference between `:e! filename' and `:e filename',
  91.      because in Evi we don't need to worry about the disposition of the
  92.      current file before editing the next one.  Use `:e#' as a
  93.      shorthand for editing the most recently accessed buffer not
  94.      visible in a window.
  95.      Same as `:e', but edits the file in another window, creating that
  96.      window if necessary.  If used with no filename, this command
  97.      splits the current buffer into two windows.
  98.      Switch to the next file in buffer list that's not currently
  99.      displayed.  Rotates the current file to the end of the buffer
  100.      list, so repeated use of `:n' will cycle thru all buffers.
  101.      Same as `:n', but switches to another window, or creates another
  102.      window and puts the next file into it.
  103.      This is an extension.  This command switches the current window to
  104.      the specified buffer, e.g. `:b foo' would switch to the buffer
  105.      named `foo' (if it exists).  By default `:b' switches to the next
  106.      buffer not displayed.  `:b!' will create the buffer if it doesn't
  107.      exist.
  108.      Analogous to :E and :N.
  109.      Another extension.  This command kills the named buffer.  If given
  110.      no argument, kills the current buffer.  `:k!' will kill the buffer
  111.      even if it is modified.
  112. `:wk'
  113.      Writes the current buffer, and kills it.
  114.      Another extension.  This command writes all modified buffers,
  115.      querying the user before each write.  `:W!' will write all buffers
  116.      with no questions asked.
  117. `:Wq'
  118.      As above, then exits emacs.  See `ZZ' below.
  119.    The ex commands which accept filenames as arguments can be file
  120. completed using space or tab.  Similarly, `:b' and `:k' will
  121. buffer-name complete.  One thing you might find handy is `:b TAB' to
  122. see a list of buffers.  Use `C-c' or backspace to escape this.
  123. File: evi,  Node: Window management,  Next: Emacs commands,  Prev: File and buffer management,  Up: Top
  124. Window management
  125. =================
  126.    Vi had commands for multiple file management, but it never tried to
  127. pretend it handled multiple windows.  However, it did have the `z'
  128. command for simple window management, like making the window bigger or
  129. smaller.  In Evi, the `z' command is extended to handle most Emacs
  130. window management needs.  Additional suggestions are welcome.
  131. `z0='
  132.      Delete the current window from the screen.
  133. `z1='
  134.      Make the current window fill the screen.
  135. `z2='
  136.      Split the current window in two vertically.
  137. `z0|'
  138.      Same as `z0='.
  139. `z1|'
  140.      Same as `z1='.
  141. `z2|'
  142.      Split the current window in two horizontally.
  143. `z<num>+'
  144. `z<num>-'
  145.      These two let you adjust the size of the current window by <num>.
  146.      Use z<num>. to adjust the window size absolutely.
  147.      Go to the next window (forward).
  148.      Same as `zf'.
  149.      Go to the previous window (backward).
  150.      Same as `zb'.
  151.      These are aliases for `zRET', `z.', and `z-' and correspond to the
  152.      arguments to the mark command.
  153. File: evi,  Node: Emacs commands,  Next: Emacs editing modes,  Prev: Window management,  Up: Top
  154. Accessing emacs commands
  155. ========================
  156.    By default, no emacs commands are accessible from Evi.  However, the
  157. three main classes of emacs commands can easily be made accessible by
  158. adding selected elisp commands suggested below to your .evirc file.
  159.    The `C-x' prefix commands integrate most easily with Evi since it
  160. would only override kill-line in input modes.  To access `C-x' prefix
  161. commands in all modes, use:
  162.      (evi-define-key evi-all-keymaps "\C-x" 'evi-emacs-command)
  163.    The Meta (or ESC prefix) commands are no problem if you just want to
  164. access them from the top-level, where in vi ESC only serves the purpose
  165. of ringing the bell, which in vi is a handy way of verifying that you're
  166. in command mode, but is not vital considering the emacs mode line.  Use
  167. the following to access Meta (or ESC prefix) commands only from the
  168. top-level:
  169.      (evi-define-key '(top-level) "\e" 'evi-emacs-command)
  170.    Accessing Meta (or ESC prefix) commands from other modes is
  171. problematic because ESC is the command to exit that mode.  However, if
  172. you wish, you can redefine the meta prefix to something else - I
  173. recommend `C-a'.  Thus to use Meta commands in all modes use:
  174.      (setq evi-meta-prefix-char ?\C-a)
  175.      (evi-define-key evi-all-keymaps "\C-a" (cons (current-global-map) ?\e))
  176.    The `C-c' prefix commands are also problematic because `C-c' is vi's
  177. interrupt character.  At the top-level, this is again not much of a
  178. problem, and you could use:
  179.      (evi-define-key '(top-level) "\C-c" 'evi-emacs-command)
  180.    `C-c' will still function as an interrupt character at all other
  181. places (including in the middle of a command, where it's most useful).
  182. In the various input modes you could forego `C-c' as your interrupt
  183. character and access the `C-c' prefix commands by using the following
  184. (presumably in addition to the above):
  185.      (evi-define-key '(input replace ex) "\C-c" 'evi-emacs-command)
  186.    Note that setting evi-insert-mode-local-bindings (described in the
  187. next section) will have the same effect because all `C-c' commands are
  188. local bindings.
  189. File: evi,  Node: Emacs editing modes,  Next: Customizing,  Prev: Emacs commands,  Up: Top
  190. Taking advantage of emacs editing modes
  191. =======================================
  192.    A number of emacs editing modes have handy local key bindings other
  193. than Meta, `C-x' and `C-c' prefix bindings.  For example, in C mode,
  194. RET does intelligent indenting, and `}' is bound to a command which
  195. automatically exdents.  By default, these aren't accessible of course,
  196. but you can have Evi enable these local bindings in insert mode by
  197. setting:
  198.      (setq evi-insert-mode-local-bindings t)
  199.    As current policy, however, Evi will not allow local mode bindings to
  200. override TAB, BS, or DEL, as well as, for obvious reasons, ESC.  ESC
  201. prefix commands, however, can be accessed as described in the previous
  202. section.
  203. File: evi,  Node: Customizing,  Next: Arrow keys,  Prev: Emacs editing modes,  Up: Top
  204. Customizing Evi
  205. ===============
  206.    Like vi, Evi will source your `.exrc' or `~/.exrc' file, and/or your
  207. `EXINIT' environment variable.  If your startup runs into problems, let
  208. me know - you shouldn't have to change your vi initialization stuff to
  209. make Evi happy.
  210.    If you wish to use some Evi extensions in your startup, but still
  211. need to use vi, place these in `.exrc.evi', `~/.exrc.evi' or `EVIINIT'
  212. so that vi won't gag on them.
  213.    Emacs lisp startup code for evi, such at that suggested in the
  214. previous sections, can be placed in either `.evirc' or `~/.evirc'.
  215.    And you can, of course, hack away at the the Evi source code if you
  216. want something not easily addressed by the above methods.  If you feel
  217. what you've done would be generally useful, please email it to me, or
  218. post it.
  219.    One particular customization, not covered elsewhere, is how Evi
  220. handles the current directory.  By default it behaves like vi - you
  221. have one global current directory, which you change using `:cd' (also
  222. see `:pushd', and friends described below).  Alternately, you may like
  223. the emacs behaviour better, which is that each buffer has its own idea
  224. of the current directory, and by default that directory is the directory
  225. that the file for that buffer resides in.  In this mode, you can also
  226. change the current directory using `:cd', but that will only affect the
  227. current buffer.  To get this behaviour, place the following in your
  228. `.evirc':
  229.      (setq evi-global-directory nil)
  230.    Another customization you might like to make is to alter the
  231. behaviour of `ZZ'.  By default it is bound to `:Wq!', which quietly
  232. writes all modified files and exits.  If, however, you would like to be
  233. asked about each modified buffer before it is saved in order to avoid
  234. accidently saving a file you didn't want saved, map `ZZ' to `:Wq':
  235.      map ZZ :Wq\n
  236. File: evi,  Node: Arrow keys,  Next: Enhancements,  Prev: Customizing,  Up: Top
  237. Arrow keys
  238. ==========
  239.    If you like your arrow keys, there's one incompatibility that's not
  240. easily fixed under version 18 of emacs.  Vi recognizes arrow keys that
  241. send ESC prefixed sequences by using a very short timeout to determine
  242. the difference between an ESC typed by a person, and an ESC sequence
  243. sent by the terminal.  A compromise, if you happen to have such a
  244. terminal is to `:set notimeout', which makes `ESC ESC' behave like a
  245. single ESC and maps your arrow keys to `h', `j', `k', and `l'.  As a
  246. side effect in Evi, the normal emacs ESC prefix commands will be in
  247. effect (except for `ESC ESC' of course).  This could be undesirable if
  248. you're in the habit of hitting the escape key a lot to verify you're in
  249. command mode, and follow that immediately with a command.  This should
  250. be fixable in version 19 of emacs.
  251. File: evi,  Node: Enhancements,  Next: New operators,  Prev: Arrow keys,  Up: Top
  252. Enhancements
  253. ============
  254. * Menu:
  255. * Edit repeat command::
  256. * Ex input escapes::
  257. * Extended undo::
  258. * Ex command completion::
  259. * Word definition::
  260. * Sentence and larger motions::
  261. * Directory commands::
  262. * Background shell commands::
  263. * Unnamed register::
  264. * New command counts::
  265. * Rectangle edits and arbitrary regions::
  266. * Shell window::
  267. * Extended marks::
  268. * Register enhancements::
  269. * Language/mode specific editing::
  270. File: evi,  Node: Edit repeat command,  Next: Ex input escapes,  Up: Enhancements
  271. Edit repeat command
  272. -------------------
  273.    `_' is a new version of the repeat command `.' that prompts you with
  274. the keystrokes to repeat, allowing you to edit them before executing.
  275. This is particularly useful for the abovementioned complex operators.
  276. If you don't wish to re-execute the command, just hit `C-c'.
  277. File: evi,  Node: Ex input escapes,  Next: Extended undo,  Prev: Edit repeat command,  Up: Enhancements
  278. Ex input escapes
  279. ----------------
  280.    If you put
  281.      (setq ex-input-escapes t)
  282.    in your `.evirc', then Ex (`:') commands will accept the following
  283. escapes: `\e' for ESC, `\n' for newline, `\r' for RET, and `\C-x' for
  284. control-x (for all valid control characters).  `\' otherwise works like
  285. `C-v'.  Thus:
  286.      map \  \C-f
  287.    would make the space character be page forward, and
  288.      map g \|
  289.    would make `g' be goto-column.  Note that `|' is normally a command
  290. separator and thus must be escaped.
  291. File: evi,  Node: Extended undo,  Next: Ex command completion,  Prev: Ex input escapes,  Up: Enhancements
  292. Extended undo
  293. -------------
  294.    The command `[u' continues the previous undo, by undoing one more
  295. change previous to the last change undone.  Thus, a long enough
  296. sequence of `[u's will take you back to the unmodified state.  If you
  297. went back too far, a `u' will reverse this process, and subsequent
  298. `[u's will move forward through the changes.  Note that vip does this
  299. using repeat command (`.'); however, that conflicts with the meaning of
  300. `u.' in vi, which is: `undo, then do again'.  This is quite handy for
  301. reapplying a change that you initially did in the wrong place, so evi
  302. leaves that meaning alone, and defines a new command for `extended
  303. undo'.  Personally, I use `extended undo' more than `undo line', so I
  304. swap the two definitions in my .evirc:
  305.      (evi-define-key '(vi) "[u" 'evi-undo-line)
  306.      (evi-define-key '(vi) "U" 'evi-undo-more)
  307. File: evi,  Node: Ex command completion,  Next: Word definition,  Prev: Extended undo,  Up: Enhancements
  308. Ex command completion
  309. ---------------------
  310.    In Ex (`:') commands, you can use the TAB to perform completion on
  311. the following: commands, variable names (:set), filenames, buffernames,
  312. maps, or abbreviations.  Which completion to perform is determined
  313. solely by where you are in the partial command you are typing.  For
  314. example:
  315.      :set erTAB
  316.    would complete to:
  317.      :set errorbells
  318.    (leaving the cursor after the `s' in `errorbells'.
  319. File: evi,  Node: Word definition,  Next: Sentence and larger motions,  Prev: Ex command completion,  Up: Enhancements
  320. Word definition
  321. ---------------
  322.    You can define exactly what Evi treats as words for the w, b, e, W, B
  323. and E commands.  They are defined by setting either or both of the new
  324. options `word' (for w, b and e) or `Word' (for W, B and E) to a regular
  325. expression describing what words look like.  For example, here's a
  326. definition of words that only considers alphanumeric words:
  327.      set word=[a-zA-Z0-9]+
  328.    Contrast this with the default definition:
  329.      [a-zA-Z0-9_]+\\\|[^a-zA-Z0-9_\ \t\n]+\\\|^[\ \t]*\n
  330.    See the emacs documentation on regular expressions for details.
  331. File: evi,  Node: Sentence and larger motions,  Next: Directory commands,  Prev: Word definition,  Up: Enhancements
  332. Sentence and larger motions
  333. ---------------------------
  334.    My interpretation of sentence, paragraph, and section motion differs
  335. somewhat from vi's in that they behave more analogously to how word
  336. motion behaves - e.g. a forward paragraph takes you to the beginning of
  337. the next paragraph - not the blank line after the previous paragraph.
  338. However, when doing a delete using one of these motions, unless you are
  339. at the beginning of the sentence, paragraph or section, the delete will
  340. only happen to the end of the sentence, paragraph or section, not to the
  341. beginning of the next.  I find this *much* more useful than the vi
  342. behaviour - if you disagree, please let me know.
  343. File: evi,  Node: Directory commands,  Next: Background shell commands,  Prev: Sentence and larger motions,  Up: Enhancements
  344. Directory commands
  345. ------------------
  346.    `:pushd', `:popd' and `:dirs' commands exist, similar to those found
  347. in csh and bash.  Note these only make sense in conjunction with
  348. evi-global-directory = t (which is the default).
  349. File: evi,  Node: Background shell commands,  Next: Unnamed register,  Prev: Directory commands,  Up: Enhancements
  350. Background shell commands
  351. -------------------------
  352.    The `:!' command now takes an optional `&' (as in `:!&'), which
  353. causes the shell command to be executed asynchronously, with the output
  354. going to the window `*Shell Command Output*'.
  355. File: evi,  Node: Unnamed register,  Next: New command counts,  Prev: Background shell commands,  Up: Enhancements
  356. Unnamed register
  357. ----------------
  358.    The unnamed register (where deleted text goes) is preserved across
  359. excursions into insert mode, etc.  This means you can delete something,
  360. insert something, then `put' the deleted text.  In vi, for no apparent
  361. reason, you can't do this, even though insert mode doesn't use the
  362. unnamed register.
  363.    The unnamed register is also preserved between buffers, so you can
  364. yank text in one buffer and put it into another.
  365. File: evi,  Node: New command counts,  Next: Rectangle edits and arbitrary regions,  Prev: Unnamed register,  Up: Enhancements
  366. New command counts
  367. ------------------
  368.    Several commands that didn't take counts in vi take counts in Evi.
  369. `p' and `P' take a prefix count and will put the text that many times,
  370. regardless of the size of the text - vi will apparently only do the
  371. prefix count for less than line sized text.  `/' takes a prefix count to
  372. find the nth occurence of a string.  `D' takes a count (I could never
  373. figure out why it didn't, since `C' takes a count).
  374. File: evi,  Node: Rectangle edits and arbitrary regions,  Next: Shell window,  Prev: New command counts,  Up: Enhancements
  375. Rectangle edits and arbitrary regions
  376. -------------------------------------
  377.    In vi, you do most of your editing based on regions defined by vi's
  378. motion commands.  For example, `dw' deletes the region starting at the
  379. current cursor location and extending up to where the cursor would be
  380. if you'd typed `w'.  Those edit commands that don't explicitly use a
  381. motion command are just shorthand for ones that do: e.g. `x' is
  382. shorthand for `dl'.
  383.    However, this doesn't give you a convenient way of operating on
  384. arbitrary rectangular regions, or regions that are inconvenient to
  385. describe by a single motion command.  Evi allows you to operate on such
  386. regions by a special form of the `m' (mark) command, and several new
  387. commands that are only understood when they are operands to edit
  388. operators (such as `c', `d', `>', etc).
  389.    The basic idea is that you will define a region by two points.  For
  390. a rectangle region, for example, you will define two opposite corners.
  391. You define the first point by using `m.'.  Then you move to the second
  392. point and execute the operator you want, specifying the motion to be
  393. one of: `r' for rectangle, `R' for rows, `C' for columns, and `a' for
  394. arbitrary (meaning everything between the marked point and where the
  395. cursor currently is).
  396.      m.3j5wda
  397.    would delete the text from where the cursor started to 3 lines down
  398. and 5 words over.  `R' is often handy for operating on large arbitrary
  399. sections of text, for example say you needed to shift some text that ran
  400. on for several pages and you weren't sure just how long it was at the
  401. start:
  402.      m.`C-f'`C-f'jjj>R
  403. File: evi,  Node: Shell window,  Next: Extended marks,  Prev: Rectangle edits and arbitrary regions,  Up: Enhancements
  404. Shell window
  405. ------------
  406.    `:shell' starts up an emacs shell in the current window (instead of
  407. suspending emacs, and starting a subshell).  The shell to run comes from
  408. the vi variable `ishell', and defaults to the value of the environment
  409. variable `SHELL'.  `:gdb program' starts up gdb in the current window on
  410. the specified program.  For both of these, you are automatically placed
  411. in insert mode, where you should be able to interact as you would expect
  412. to, except that ESC will take you into command mode.  While in command
  413. mode, hitting return will send the current line as input to the
  414. shell/gdb, similar to command-line editing vi-style in bash, but will
  415. leave you in command mode.
  416. File: evi,  Node: Extended marks,  Next: Register enhancements,  Prev: Shell window,  Up: Enhancements
  417. Extended marks
  418. --------------
  419.    The marks used by the mark command `m' are emacs markers, thus they
  420. mark a position in a buffer, not necessarily the current one.  This
  421. affects the goto mark commands ``' and `''.  For example, if mark `a'
  422. is placed in one buffer, then later in another buffer, the command ``a'
  423. is typed, evi will first switch to that buffer, then go to the location
  424. in that buffer.  `'' and ``' also accept `.' and `,' for pop context,
  425. and unpop context respectively.  Thus, `'.' will take you to the
  426. previous context (defined as in vi by a region of relative motion, with
  427. an `absolute' motion pushing a new context.  quotes surround `absolute'
  428. because a search is considered an absolute motion for this purpose),
  429. and `'.' will take you to the context before that.  There is a ring of
  430. 10 contexts so after 10 `'.' commands you'll end up at the original
  431. previous context.  `Unpop context' means move forward thru the ring.
  432. `''' and ```' are defined as exchange current location with the location
  433. of the previous context.  The context ring is buffer local, so use of it
  434. will always keep you in the same buffer.
  435. File: evi,  Node: Register enhancements,  Next: Language/mode specific editing,  Prev: Extended marks,  Up: Enhancements
  436. Register enhancements
  437. ---------------------
  438.    Two changes involving registers.  First, `"'', and `""', are new
  439. commands which allow you to insert literal text directly into a
  440. register.  `"'' inserts a single character, and `""' inserts a string.
  441. E.g.  `""helloESC' inserts the string `hello' into the unnamed
  442. register, and `"a"'/' inserts a slash into register a.  The choice of
  443. command names are intuitive (they suggest quotes around a literal
  444. char/string), albeit unfortunate because `"' is supposed to be the
  445. prefix for a register specification, not a command.  Second, the
  446. register specification `"^' specifies appending to the unnamed register
  447. (the one that gets used when no register is specified).  E.g.,
  448. `"^""ickESC' appends `ick' to the unnamed register.
  449. File: evi,  Node: Language/mode specific editing,  Prev: Register enhancements,  Up: Enhancements
  450. Language/mode specific editing
  451. ------------------------------
  452.    `%' exhibits language sensitivity in that it ignores parentheses
  453. embedded in quotes.  What defines quotes is based on what minor mode
  454. emacs is in (such as c-mode or lisp-mode), or you can roll your own (see
  455. emacs command modify-syntax-entry).
  456.    `=' is no longer specific to `:set lisp'.  It indents according to
  457. the mode.  See emacs command indent-according-to-mode.
  458. File: evi,  Node: New operators,  Next: Differences,  Prev: Enhancements,  Up: Top
  459. New operators
  460. =============
  461.    The `*' operator can be used to send text to emacs processes.  `*'
  462. prompts for the name of a process buffer, and the region specified is
  463. sent to that process.  Subsequent invocations of `*' will use the same
  464. process buffer as last specified as a default.  E.g., to send the
  465. current line of text as a command to the emacs shell (see `:shell'),
  466. type `***shell*RET', or if the shell is already the default, just
  467. `**RET'.  Paragraph motion or parenthesis match is often perfect for
  468. sending function definitions to an interpreter, e.g. place the cursor at
  469. the beginning of the function, and type `*}RET' or `*%RET'.  If the
  470. function def is less easily described you can use `m.' and `yR'
  471. described above.  In specifiying the process buffer, you can use buffer
  472. completion using space or tab.
  473.    I'm experimenting with some new complex operators.  I'm particularly
  474. interested in your thoughts on these:
  475.    `[{' operates over lines in a region.  It takes a motion, and a
  476. sequence of operations to perform on each line in the region defined by
  477. the motion.  The sequence of operations is prompted for on the bottom
  478. line.  Double the `{' to operate on whole lines.  The point starts in
  479. the first column for each line operated on.  For example:
  480.      [{}i> `C-v'ESCRET
  481.    would prefix every line in the rest of the current paragraph with `>
  482. '.  The `C-v ESC' sequence inserts an ESC into the string you are
  483. entering so that it will terminate input when the loop body is executed,
  484. not as you are entering the command.  For example:
  485.      10[{{i/* `C-v'ESCA */`C-v'ESCRET
  486.    would place C-style comments around the next 10 lines.
  487.    `[(' defines a parameterized macro body.  A parameterized macro is
  488. diff- erent from standard macro text in that it is parameterized by
  489. prefix count and register specification.  In the body of such a macro,
  490. there are two special commands: `#' and `&'.  `#' is replaced by the
  491. prefix count applied to this macro, and `&' is replaced by the register
  492. specification applied to this macro.  For example:
  493.      "a8[(j#w&dwRET
  494.    would go down one line, move over 8 words, then delete the next word
  495. into register `a'.  This is rather contrived, but it gives you the idea.
  496. Param- eterized macro bodies are obviously not very useful typed out
  497. each time, and are intended to be the body of a map macro.  For example:
  498.      :map M [(j#w&dw\eRET
  499.      "a8M
  500.    would be a much more likely scenario for the use of such a macro.
  501. File: evi,  Node: Differences,  Next: Ex commands,  Prev: New operators,  Up: Top
  502. Differences
  503. ===========
  504.    The following vi commands behave differently in Evi or not
  505. implemented:
  506. `C-@'
  507.      (insert mode only) Not implemented.
  508. `C-q'
  509.      Not implemented.
  510. `C-['
  511.      Doesn't always do the right thing, and it doesn't do the timeout
  512.      trick necessary to allow it to recognize keypad sequences.
  513.      Not implemented.
  514.      Quits evi mode, returning you to emacs, similiar to the way `Q' in
  515.      vi quits visual mode, returning you to ex.
  516.    Digit registers don't work entirely correctly - there are
  517. circumstances in which separate lines of a change/deletion are supposed
  518. to go into separate registers
  519.    `:set lisp' has no effect, however, emacs does largely take care of
  520. any lisp'ish behaviour you'd want automatically if the file you're
  521. editing is suffixed with `.l' or `.el'.  One particular loss, however,
  522. is that `)' and `(' don't work on s-expressions like they would in vi
  523. with lisp set.
  524. File: evi,  Node: Ex commands,  Next: Note to vip users,  Prev: Differences,  Up: Top
  525. Supported ex commands and variable settings
  526. ===========================================
  527.    The following ex commands are supported in Evi:
  528.      abbrev, cd, chdir, copy, delete, edit, file, global, map, move, next,
  529.      preserve, print, put, quit, read, recover, set, shell, source, substitute,
  530.      tag, unabbrev, unmap, write, wq, yank, !, <, >, &
  531.    The following ex variable settings are supported in Evi:
  532.      autoindent, errorbells, ignorecase, magic, notimeout, shell,
  533.      shiftwidth, showmatch, tabstop, wrapmargin, wrapscan
  534. File: evi,  Node: Note to vip users,  Next: Bugs,  Prev: Ex commands,  Up: Top
  535. Note to vip users
  536. =================
  537.    Undo does not continue via `.'.  This is incompatible with vi - the
  538. sequence `u.' in vi means `undo, then do again', whereas in vip it means
  539. `undo, then undo some more.'  For the vip functionality use
  540. evi-undo-more, described in the section on enhancements.
  541.    The vip commands for editing a file (`v' and `V') and switching
  542. buffers (`s', and `S') are not supported.  Use `:e', `:E', `:b', and
  543. `:B' instead.  See previous section on file and buffer management, or
  544. try these cute macros which are (mostly) functional replacements,
  545. including doing file and buffer completion (note the space on the end
  546. of the line):
  547.      :map v :edit |map V :Edit |map K :kill |map s :buffer |map S :Buffer
  548.    `:q' exits emacs.  I believe the default behaviour in vip is to
  549. simply kill the current buffer (a concept vi doesn't really have) -
  550. either that or quit vi emulation.  Any of these choices is reasonable,
  551. however, given `:k' for killing buffers (a new command for a new
  552. concept), and `Q' for exiting vi emulation, I chose to have `:q' do
  553. exactly what it does in vi.
  554. File: evi,  Node: Bugs,  Next: Mailing list,  Prev: Note to vip users,  Up: Top
  555. What to do if things go wrong
  556. =============================
  557.    There are still some glitches in evi, of course, and if you encounter
  558. one, please email me what went wrong, in as much detail as you can.  My
  559. address is jlewis@cse.ogi.edu.  In the meantime, if Evi doesn't seem to
  560. be responding, or you're having difficulty getting out of some mode,
  561. first try `C-c' (this is vi's interrupt character), then if you're still
  562. in a pickle, try `C-g' (this is emacs' interrupt character - there are
  563. some situations that you might get into where it works instead of
  564. `C-c').
  565. File: evi,  Node: Mailing list,  Next: Getting a copy of Evi,  Prev: Bugs,  Up: Top
  566. Mailing list
  567. ============
  568.    There is a mailing list for discussion of evi - usage, bugs, new
  569. features, etc.  To join the list, send a note to
  570. evi-list-request@brandx.rain.com including your e-mail address in the
  571. body of the message.  To submit to the list, send mail to
  572. evi-list@brandx.rain.com.
  573. File: evi,  Node: Getting a copy of Evi,  Next: Credits,  Prev: Mailing list,  Up: Top
  574. Getting a copy of Evi
  575. =====================
  576.    You can obtain a copy of Evi via FTP from an elisp archive site, or
  577. from the mail-server on my machine (which will assure the most
  578. up-to-date version).  The main elisp-archive is at
  579. archive.cis.ohio-state.edu (in the directory gnu/emacs/elisp-archive) -
  580. Evi is in modes/evi.el.Z.  To get it from my mail-server, send a
  581. message to mail-server@brandx.rain.com containing:
  582.      send evi.el
  583.    - or -
  584.      send evi.el.Z
  585.    followed by:
  586.      end
  587.    `evi.el.Z' will be uuencoded for delivery.  Also, add `send index'
  588. if you want the file sizes.
  589. File: evi,  Node: Credits,  Prev: Getting a copy of Evi,  Up: Top
  590. Credits
  591. =======
  592.    Masahiko Sato - for having the audacity to write vip in the first
  593. place ;-) Eric Bensen - for being the first real advocate and those
  594. helpful folks who gave feedback on the first release and the following
  595. immensely helpful souls: James Montebello, Steven Dick, Mike Sangrey,
  596. Brian Divine, Bill Reynolds, Roger E. Benz, Richard Ryan, Volker
  597. Englisch, John Haugen, Calvin Clark, Sam Falkner, Mark Pulver and
  598. Cameron Gregory
  599. Tag Table:
  600. Node: Top
  601. Node: Overview
  602. Node: Setting up Evi
  603. Node: File and buffer management
  604. Node: Window management
  605. Node: Emacs commands
  606. Node: Emacs editing modes
  607. 10156
  608. Node: Customizing
  609. 10954
  610. Node: Arrow keys
  611. 12874
  612. Node: Enhancements
  613. 13784
  614. Node: Edit repeat command
  615. 14283
  616. Node: Ex input escapes
  617. 14683
  618. Node: Extended undo
  619. 15290
  620. Node: Ex command completion
  621. 16252
  622. Node: Word definition
  623. 16805
  624. Node: Sentence and larger motions
  625. 17501
  626. Node: Directory commands
  627. 18293
  628. Node: Background shell commands
  629. 18648
  630. Node: Unnamed register
  631. 19005
  632. Node: New command counts
  633. 19577
  634. Node: Rectangle edits and arbitrary regions
  635. 20151
  636. Node: Shell window
  637. 21874
  638. Node: Extended marks
  639. 22689
  640. Node: Register enhancements
  641. 23923
  642. Node: Language/mode specific editing
  643. 24814
  644. Node: New operators
  645. 25351
  646. Node: Differences
  647. 27900
  648. Node: Ex commands
  649. 28915
  650. Node: Note to vip users
  651. 29540
  652. Node: Bugs
  653. 30720
  654. Node: Mailing list
  655. 31369
  656. Node: Getting a copy of Evi
  657. 31755
  658. Node: Credits
  659. 32433
  660. End Tag Table
  661.